import request from '@/utils/request'

// 查询订单列表
export function orderList(query) {
  return request({
    url: '/order/list',
    method: 'get',
    params: query
  })
}
//置顶
export function orderTop(data) {
  return request({
    url: '/order/top',
    method: 'put',
	data:data
  })
}
//取消置顶
export function orderUnTop(data) {
  return request({
    url: '/order/unTop',
    method: 'put',
	data:data
  })
}
//详情
export function orderDetail(id) {
  return request({
    url: '/order/number/'+id,
    method: 'get',
  })
}
//新增
export function orderAdd(data) {
  return request({
    url: '/order',
    method: 'post',
    data: data
  })
}
//编辑
export function orderEdit(data) {
  return request({
    url: '/order',
    method: 'put',
    data: data
  })
}
//删除
export function orderDel(id) {
  return request({
    url: '/order/'+id,
    method: 'DELETE',
  })
}
//保存草稿
export function orderDemo(data) {
  return request({
    url: '/order/draft',
    method: 'post',
    data: data
  })
}
//操作日志
export function approvalLog(query) {
  return request({
    url: '/approval_log/list',
    method: 'get',
    params: query
  })
}
//根据订单编号查找详情{number}
export function orderNumberDetail(id) {
  return request({
    url: '/order/number/'+id,
    method: 'get'
  })
}
//计算提成
export function fnRoyalties(data) {
  return request({
    url: '/jb_tool/fnRoyalties',
    method: 'post',
	data: data
  })
}
//订单审批列表
export function auditOrderList(query) {
  return request({
    url: '/audit/orderList',
    method: 'get',
	params: query
  })
}
//订单审批操作
export function auditOrder(data) {
  return request({
    url: '/audit',
    method: 'post',
	data: data
  })
}
//结束订单
export function orderEnd(data) {
  return request({
    url: '/order/end',
    method: 'put',
	data: data
  })
}
//计算商品箱数
export function fnCommodity(data) {
  return request({
    url: '/order/fnCommodity',
    method: 'post',
	data: data
  })
}
//获取商品折算价格
export function conversion(query) {
  return request({
    url: '/commodity/conversion',
    method: 'get',
	params: query
  })
}

//查询流程信息
export function findProcess(query) {
  return request({
    url: '/order/findProcess',
    method: 'get',
	params: query
  })
}